import type {RouteRecordRaw} from 'vue-router';

export const staticRoutes: RouteRecordRaw[] = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      hidden: true,
    },
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/views/home/index.vue'),
    children: [
      {
        path: '/home/recommend',
        name: 'Recommend',
        component: () => import('@/views/home/recommend/index.vue'),
      },
      {
        path: '/home/production',
        name: 'Production',
        component: () => import('@/views/home/production/index.vue'),
      },
      {
        path: '/home/tutorial',
        name: 'Tutorial',
        component: () => import('@/views/home/tutorial/index.vue'),
      },
      {
        path: '/home/special',
        name: 'Special',
        component: () => import('@/views/home/special/index.vue'),
      },
      {
        path: '/home/dynamic',
        name: 'Dynamic',
        component: () => import('@/views/home/dynamic/index.vue'),
      },
      {
        path: '/home/attention',
        name: 'Attention',
        component: () => import('@/views/home/attention/index.vue'),
      },
      {
        path: '/',
        redirect: '/home/recommend',
      },
    ],
  },
  {
    path: '/course',
    redirect: '/videoCourse',
    name: 'Course',
    component: () => import('@/views/course/index.vue'),
    children: [
      {
        path: '/membersArea',
        name: 'MembersArea',
        component: () => import('@/views/course/membersArea/index.vue'),
        meta: {title: '会员专区', id: 1},
      },
      {
        path: '/videoCourse',
        name: 'VideoCourse',
        component: () => import('@/views/course/videoCourse/index.vue'),
        meta: {title: '视频课', id: 2},
      },
      {
        path: '/liveCourse',
        name: 'LiveCourse',
        component: () => import('@/views/course/liveCourse/index.vue'),
        meta: {title: '直播课', id: 3},
      },
      {
        path: '/lineCourse',
        name: 'LineCourse',
        component: () => import('@/views/course/lineCourse/index.vue'),
        meta: {title: '线下课', id: 4},
      },
      {
        path: '/motif',
        name: 'Motif',
        component: () => import('@/views/course/motif/index.vue'),
        meta: {title: '主题', id: 5},
      },
    ]
  },
  {
    path: '/interflow',
    name: 'Interflow',
    component: () => import('@/views/interflow/index.vue'),
  },
  {
    path: '/practice',
    name: 'Practice',
    component: () => import('@/views/practice/index.vue'),
    children: [
      {
        path: '/practice/room',
        name: 'MyRoom',
        component: () => import('@/views/practice/MyRoom/index.vue'),
      },

      {
        path: '/practice/mediaCache',
        name: 'MediaCache',
        component: () => import('@/views/practice/MediaCache/index.vue'),
      },

      {
        path: '/practice/collections',
        name: 'Collections',
        component: () => import('@/views/practice/Collections/index.vue'),
      },

      {
        path: '/practice/viewrecords',
        name: 'ViewRecords',
        component: () => import('@/views/practice/ViewRecords/index.vue'),
      },
      {
        path: '',
        redirect: '/practice/room',
      },
    ],
  },
  {
    path: '/communication',
    name: 'Communication',
    redirect: '/communication/systemInfo',
    component: () => import('@/views/Communication/index.vue'),
    children: [
      {
        path: 'communicationAside',
        name: 'CommunicationAside',
        component: () =>
          import('@/views/Communication/CommunicationAside/index.vue'),
      },
      {
        path: 'systemInfo',
        name: 'SystemInfo',
        component: () => import('@/views/Communication/SystemInfo/index.vue'),
      },
      {
        path: 'interactive',
        name: 'Interactive',
        component: () => import('@/views/Communication/Interactive/index.vue'),
      },
      {
        path: 'orderInfo',
        name: 'OrderInfo',
        component: () => import('@/views/Communication/OrderInfo/index.vue'),
      },
    ],
  },
  {
    path: '/my',
    name: 'My',
    component: () => import('@/views/my/index.vue'),
    redirect: '/my/my_dynamics',
    children: [
      {
        path: 'my_dynamics',
        name: 'My_dynamics',
        component: () => import('@/views/my/my_dynamics/index.vue'),
        meta: {title: ['资源动态']},
      },
      {
        path: 'my_member',
        name: 'My_member',
        component: () => import('@/views/my/my_member/index.vue'),
        meta: {title: ['我的会员']},
      },
      {
        path: 'my_wallet',
        name: 'My_wallet',
        component: () => import('@/views/my/my_wallet/index.vue'),
        meta: {title: ['我的钱包']},
      },
      {
        path: 'my_coupons',
        name: 'My_coupons',
        component: () => import('@/views/my/my_coupons/index.vue'),
        meta: {title: ['我的优惠劵']},
      },
      {
        path: 'my_order',
        name: 'My_order',
        component: () => import('@/views/my/my_order/index.vue'),
        meta: {
          title: [
            '全部订单',
            '待付款',
            '待评价',
            '待服务/发货',
            '待确认',
            '退款/售后',
          ],
        },
      },
      {
        path: 'seller/orders_manager',
        name: 'Orders_manager',
        component: () => import('@/views/my/seller/orders_manager/index.vue'),
        meta: {
          title: [
            '全部订单',
            '待付款',
            '待评价',
            '待服务/发货',
            '待确认',
            '退款/售后',
          ],
        },
      },
      {
        path: 'seller/goods_manager',
        name: 'Goods_manager',
        component: () => import('@/views/my/seller/goods_manager/index.vue'),
        meta: {title: ['全部商品', '线下课', '视频课', '直播课']},
      },
      {
        path: 'data',
        name: 'MyData',
        component: () => import('@/views/My/MyData/index.vue'),
        meta: {tittle: '我的资料'},
      },
    ],
  },

  {
    path: '/',
    redirect: '/home',
  },

  {
    path: '/404',
    name: '404',
    component: () => import('@/views/error/404.vue'),
    meta: {
      hidden: true,
    },
  },

  /* 匹配任意的路由 必须最后注册 */
  {
    path: '/:pathMatch(.*)',
    name: 'Any',
    redirect: '/404',
    meta: {
      hidden: true,
    },
  },
];
